-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Transcode Quality #371
Conversation
CI is failing, but it's unrelated to this PR, failing also on master: https://github.com/livepeer/lpms/actions/runs/6022454830/job/16337223769?pr=372 |
|
||
// There's no direct numerical correspondence between CQ and CRF. | ||
// From some experiments, it seems that setting CQ = CRF + 7 gives similar visual effects. | ||
cq := p.Profile.CRF + 7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did you end up with this formula? Lower CQ values typically indicate better quality at expense of compressions. Also encoders typically will pick either CQ and CRF as the main control so I'm not sure if CQ here will actually make a difference. Do you see a difference if we leave out CQ changes here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CRF is used by CPU-based transcoding, CQ is used by GPU-based transcoding.
So, only one of these values will be used at the time.
Technically there is no direct numerical correspondence between CQ and CRF, so the other option would be to set both CRF and CQ in our API. But I think it's not a pragmatic approach right now. Most of our transcoders are GPU anyway.
How did I come with cq := p.Profile.CRF + 7
, just experimenting with videos. But obviously not for all videos it will give the same results, since technically CRF and CQ values do not correspond to each other.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cq := p.Profile.CRF + 7
doesn't quite make sense to me esp since they don't correspond to one another. Also if CRF is CPU only, then why do we need it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explained here: https://discord.com/channels/423160867534929930/1140578841136484402/1149041283583721634
lets discuss more in discord
Add params: - `-preset slow` - `-tier high` - `-cq` / `-crf`
Improve Transcode Quality with:
-preset slow -tier high
Note that there will be a separate PR to change
scale_cuda
toscale_npp
.Related: